<html>
<head>
	<title>Excersise 4</title>
	<link href="styles/js-console.css" rel="stylesheet" />
</head>
<body>
	<div id="js-console"></div>
	<script src="scripts/js-console.js"></script>
	<script>
	var numbers = new Array(5, 7, 4, 5, 6, 8, 11, 6, 7, 3);
	var currentSeq = 1;
	var maxSeq = 1;
	var startingElement = 0;
	for (i = 0;i < numbers.length;i++)
	{	
		if (numbers[i] < numbers[i + 1])
		{
			currentSeq++;
		}
		else
		{
			if (currentSeq > maxSeq)
			{
				maxSeq = currentSeq;
				currentSeq = 1;
				startingElement = numbers[i - maxSeq + 1];
			}
		}
		jsConsole.writeLine("Element " + i + " is: " +  numbers[i]);
	}
	jsConsole.writeLine("longest sequence: " + maxSeq + ", starting element: " + startingElement);
	</script>
</body>
</html>
